<@sys.siteList parentId=parentId name=name pageIndex=pageNum pageSize=numPerPage>
<div class="pageHeader card">
    <form class="pagerForm" autocomplete="off" onsubmit="return navTabSearch(this);" method="post">
        <#include "../include_page/parameters.html"/>
        <div class="searchBar">
            <ul class="searchContent">
            <#if parentId?has_content>
                <li>
                    <label><@t.page 'site.parent'/>:</label><label><@sys.site id=parentId>${object.name!}</@sys.site></label>
                </li>
            </#if>
                <li>
                    <label><@t.page 'name'/>:</label>
                    <input type="text" size="20" name="name" value="${name!}"/>
                </li>
            </ul>
            <div class="subBar">
                <ul>
                    <li>
                        <button type="submit" class="buttonActive"><@t.page 'button.search'/></button>
                    </li>
                </ul>
            </div>
        </div>
    </form>
</div>
<div class="card">
    <div class="panelBar">
        <ul class="toolBar">
        <#if parentId?has_content>
            <li><a href="sysSite/list.html" target="navTab" rel="sysSite/list"><i class="icon-circle-arrow-up icon-large"></i><@t.page 'button.return'/></a></li>
            <li class="line">line</li>
        </#if>
            <li><a href="sysSite/add.html?parentId=${parentId!}" target="navTab" rel="sysSite/add"><i class="icon-plus-sign-alt icon-large"></i><@t.page 'site.add'/></a></li>
        </ul>
    </div>
    <table class="table" width="100%" layoutH>
        <thead>
            <tr>
                <th width="30"><@t.page 'id'/></th>
                <th><@t.page 'name'/></th>
            <#if parentId?has_content>
                <th><@t.page 'directory'/></th>
            </#if>
                <th><@t.page 'site.dynamic_path'/></th>
                <th><@t.page 'site.enable_static'/></th>
                <th><@t.page 'site.site_path'/></th>
                <th><@t.page 'operate'/></th>
            </tr>
        </thead>
        <tbody>
            <#list page.list as a>
            <tr>
                <td>${a.id}</td>
                <td class="exclude-translate">${a.name!} <#if site.id=a.id>[<@t.page 'site.current_site'/>]</#if></td>
            <#if parentId?has_content>
                <td class="exclude-translate">${a.directory!}</td>
            </#if>
                <td><a href="${a.dynamicPath!}" target="_blank">${a.dynamicPath!}</a></td>
                <td>${a.useStatic?then(t.pageMessage('yes'),t.pageMessage('no'))} ${a.useSsi?then('['+t.pageMessage('ssi_enabled')+']','')}</td>
                <td><a href="${a.sitePath!}" target="_blank">${a.sitePath!}</a></td>
                <td class="wrap">
                    <a href="sysSite/add.html?id=${a.id}" class="edit btnText blue" target="navTab" rel="sysSite/edit"><i class="icon-edit"></i><@t.page 'site.edit'/></a>
                    <a href="sysDomain/add.html?siteId=${a.id!}" class="btnText blue" target="navTab" rel="sysDomain/add"><@t.page 'domain.add'/></a>
                    <a href="sysDomain/list.html?siteId=${a.id!}" class="btnText" target="navTab" rel="sysDomain/list"><@t.page 'domain.list'/></a>
                    <a href="sysSite/export?id=${a.id!}&_csrf=<@tools.csrfToken admin=true/>" class="btnText" target="dwzExport"><@t.page 'button.export'/></a>
                <#if !a.parentId?has_content>
                    <a href="sysSite/list.html?parentId=${a.id!}" class="btnText" target="navTab" rel="sysSite/list"><@t.page 'site.child_management'/></a>
                </#if>
                    <a href="sysSite/configTemplate.html?siteId=${a.id!}" class="btnText" target="dialog" rel="config_${a.id!}"><@t.page 'server_config'/></a>
                    <a href="sysSite/delete?id=${a.id}&_csrf=<@tools.csrfToken admin=true/>" class="btnText warn" title="<@t.page 'confirm.delete'/>" target="ajaxTodo"><i class="icon-trash"></i><@t.page 'button.delete'/></a>
                </td>
            </tr>
            </#list>
        </tbody>
    </table>
    <#include "../include_page/page.html"/>
</div>
</@sys.siteList>